<div class="page-content" >
            
    <div class="panel panel-default">
	 <div class="panel-heading">
         <ul class="breadcrumb"> 
				<li><a href="<{:U('School/time_list')}>">时间段管理</a> </li>
				<li class="active">添加/修改</li>
			</ul>
		</div>	
        <div class="panel-body">
            <form id="form" class="form-horizontal" enctype="multipart/form-data" action="<{:U('School/updateTime')}>" autocomplete="off" method="post" novalidate="novalidate">
                <input type="hidden" name="id" value="<{$data.id}>">
            
                <div class="form-group">
                    <label class="col-sm-2 control-label">课程名</label>
                    <div class="col-sm-7">
                        <select name="subjectid" >
                            <option value="0">全部</option>
                            <volist name="subject_list" id="vo">
                            <option <if condition="$vo['subjectid'] eq $data['subjectid']">selected="selected"</if> value="<{$vo.subjectid}>"><{$vo.showname}></option>
                            </volist>
                            </select>
                            
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                 
				 <div class="form-group">
                    <label class="col-sm-2 control-label">机房</label>
                    <div class="col-sm-7">
                        <select name="class_room_id">
							<option value="">请选择机房</option>
							<volist name="classrooms_list" id="vo">
							<option <if condition="$vo['id'] eq $data['class_room_id']">selected="selected"</if> value="<{$vo.id}>"><{$vo.name}></option>
							</volist>
					</select>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
				
                    <div class="form-group">
                    <label class="col-sm-2 control-label">周</label>
                    <div class="col-sm-7">
                       <select name="week">
							<option value="">请选择周几</option>
							<volist name="week_list" id="vo">
							<option <if condition="$key eq $data['week']">selected="selected"</if> value="<{$key}>"><{$vo}></option>
							</volist>
					</select>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
				 
																
					<div class="form-group">
                    <label class="col-sm-2 control-label">时间段</label>
                    <div class="col-sm-7">
                          <input type="text" name="lable" class="form-control" value="<{$data.lable}>">
			       </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                  
						
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-7">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
   

        </div>

<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            class_room_id: {
                message: '机房名称',
                validators: {
                    notEmpty: {
                        message: '机房名称不能空'
                    },
                }
            },
			lable: {
                message: '时间段',
                validators: {
                    notEmpty: {
                        message: '时间段不能空'
                    },
                }
            },
            week: {
                message: '周几',
                validators: {
                    notEmpty: {
                        message: '请选择周几不能空'
                    },
                }
            },
            subjectid: {
                message: '请选择课程',
                validators: {
                    notEmpty: {
                        message: '请选择课程'
                    },
                }
            },


        }
    });
	
 
});
 </script>
     
